package com.gitee.ly.ymorm.session;

import com.gitee.ly.ymorm.YmOrmConfig;
import com.gitee.ly.ymorm.transaction.TransactionIsolationLevel;

import java.sql.Connection;

/**
 * SqlSessionFactory
 *
 * @author ly
 **/
public interface SqlSessionFactory {
    SqlSession openSession();

    SqlSession openSession(boolean autoCommit);

    SqlSession openSession(Connection connection);

    SqlSession openSession(TransactionIsolationLevel level);

    SqlSession openSession(ExecutorType execType);

    SqlSession openSession(ExecutorType execType, boolean autoCommit);

    SqlSession openSession(ExecutorType execType, TransactionIsolationLevel level);

    SqlSession openSession(ExecutorType execType, Connection connection);

    YmOrmConfig getConfiguration();
}
